package io.homework;

import java.io.FileInputStream;
import java.io.FileOutputStream;

public class Test3 {
    public static void main(String[] args) throws Exception {
        FileInputStream fis = new FileInputStream("test.txt");
        FileOutputStream fos = new FileOutputStream("test1.txt");

        int d ;
        while ((d=fis.read())!=-1){
            fos.write(d);
        }
        System.out.println("复制完成");
        fis.close();
        fos.close();
    }
}
